package com.itheima.service.impl;

import com.itheima.mapper.SetmealMapper;
import com.itheima.pojo.Setmeal;
import com.itheima.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SetmealServiceImpl implements SetmealService {

    @Autowired
    private SetmealMapper setmealMapper;

    /**
     * 获取所有套餐信息
     */
    public List<Setmeal> getSetmeal() {
        return setmealMapper.getSetmeal();
    }

    /**
     * 根据套餐id查询套餐详情
     * @param id
     * @return
     */
    public Setmeal findById(Integer id) {
        return setmealMapper.findById(id);
    }
}
